<?php
/**
 * Created by IntelliJ IDEA.
 * User: ahwwl
 * Date: 2018/5/7
 * Time: 下午1:17
 */

namespace app\model;


class MobileMsg extends CommentModel
{
    protected $table = "f_mobile_msg";

    function sendMsg($msgid,$mobile,$content)
    {
        try
        {
            $info = [
                "mobile"  => $mobile,
                "content" => $content,
                "msgid"   => $msgid,
                "ctime"   => NOW_TIME,
                "mtime"   => NOW_TIME,
            ];
            return $this->insert($info);
        }catch (\Exception $e)
        {

        }
        return false;

    }
    function msgStatus($msgid,$status)
    {
        try{
            return $this->where(["msgid"=>$msgid,"status"=>0])->update(["status"=>$status]);
        }catch (\Exception $e)
        {

        }
        return false;
    }
}